import request from '@/utils/request'

// 审批公文
export function approveDocument(data, approverId, approverName) {
  return request({
    url: '/approvals',
    method: 'post',
    data,
    params: { approverId, approverName }
  })
}

// 获取公文审批记录
export function getApprovalRecords(documentId) {
  return request({
    url: `/approvals/document/${documentId}`,
    method: 'get'
  })
}

// 获取我的审批记录
export function getMyApprovalRecords(params) {
  return request({
    url: '/approvals/my',
    method: 'get',
    params
  })
} 